LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := user

LOCAL_ARM_MODE := arm

# This is the target being built.
LOCAL_MODULE := libatari

LOCAL_CPP_EXTENSION = .cxx

# All of the source files that we will compile.
LOCAL_SRC_FILES := \
	common/SoundNull.cxx \
	emucore/AtariVox.cxx \
	emucore/Booster.cxx \
	emucore/Cart2K.cxx \
	emucore/Cart3F.cxx \
	emucore/Cart3E.cxx \
	emucore/Cart4A50.cxx \
	emucore/Cart4K.cxx \
	emucore/CartAR.cxx \
	emucore/CartCV.cxx \
	emucore/Cart.cxx \
	emucore/CartDPC.cxx \
	emucore/CartDPCPlus.cxx \
	emucore/CartE0.cxx \
	emucore/CartE7.cxx \
	emucore/CartEF.cxx \
	emucore/CartEFSC.cxx \
	emucore/CartF0.cxx \
	emucore/CartF4.cxx \
	emucore/CartF4SC.cxx \
	emucore/CartF6.cxx \
	emucore/CartF6SC.cxx \
	emucore/CartF8.cxx \
	emucore/CartF8SC.cxx \
	emucore/CartFA.cxx \
	emucore/CartFE.cxx \
	emucore/CartMC.cxx \
	emucore/CartSB.cxx \
	emucore/CartUA.cxx \
	emucore/Cart0840.cxx \
	emucore/CartX07.cxx \
	emucore/Console.cxx \
	emucore/Control.cxx \
	emucore/Device.cxx \
	emucore/Driving.cxx \
	emucore/Event.cxx \
	emucore/EventHandler.cxx \
	emucore/FrameBuffer.cxx \
	emucore/FSNode.cxx \
	emucore/Genesis.cxx \
	emucore/Joystick.cxx \
	emucore/Keyboard.cxx \
	emucore/KidVid.cxx \
	emucore/M6502.cxx \
	emucore/M6532.cxx \
	emucore/MT24LC256.cxx \
	emucore/NullDev.cxx \
	emucore/MD5.cxx \
	emucore/MediaFactory.cxx \
	emucore/OSystem.cxx \
	emucore/Paddles.cxx \
	emucore/Props.cxx \
	emucore/PropsSet.cxx \
	emucore/Random.cxx \
	emucore/SaveKey.cxx \
	emucore/Serializer.cxx \
	emucore/Settings.cxx \
	emucore/Switches.cxx \
	emucore/StateManager.cxx \
	emucore/System.cxx \
	emucore/TIA.cxx \
	emucore/TIASnd.cxx \
	emucore/TIATables.cxx \
	emucore/TrackBall.cxx \
	emucore/unzip.c \
	unix/FSNodePOSIX.cxx \
	unix/OSystemUNIX.cxx \
	unix/SettingsUNIX.cxx

LOCAL_SRC_FILES += \
	android/giz_blit.s \
	android/giz_blit_rev.s \
	android/FrameBufferAndroid.cxx \
	android/SoundAndroid.cxx \
	android/atariengine.cxx \
gui/AboutDialog.cxx      gui/EditableWidget.cxx      gui/InputTextDialog.cxx       \
gui/RomAuditDialog.cxx gui/AudioDialog.cxx      gui/EditTextWidget.cxx      gui/Launcher.cxx \
gui/RomInfoWidget.cxx gui/BrowserDialog.cxx    gui/EventMappingWidget.cxx  gui/LauncherDialog.cxx \
gui/ScrollBarWidget.cxx gui/CheckListWidget.cxx  gui/FileSnapDialog.cxx \
gui/LauncherFilterDialog.cxx  gui/StringListWidget.cxx gui/ComboDialog.cxx      gui/Font.cxx \
gui/ListWidget.cxx            gui/TabWidget.cxx gui/CommandDialog.cxx    gui/GameInfoDialog.cxx \
gui/Menu.cxx                  gui/UIDialog.cxx gui/CommandMenu.cxx      gui/GameList.cxx \
gui/MessageBox.cxx            gui/VideoDialog.cxx gui/ContextMenu.cxx      gui/GlobalPropsDialog.cxx \
gui/OptionsDialog.cxx         gui/Widget.cxx gui/DialogContainer.cxx  gui/HelpDialog.cxx \
gui/PopUpWidget.cxx gui/Dialog.cxx           gui/InputDialog.cxx         gui/ProgressDialog.cxx \
libpng/example.c   libpng/pngmem.c    libpng/pngrtran.c  libpng/pngtrans.c  libpng/pngwutil.c \
libpng/png.c       libpng/pngpread.c  libpng/pngrutil.c  libpng/pngwio.c \
libpng/pngerror.c  libpng/pngread.c   libpng/pngset.c    libpng/pngwrite.c \
libpng/pngget.c    libpng/pngrio.c    libpng/pngtest.c   libpng/pngwtran.c \
common/PNGLibrary.cxx common/Snapshot.cxx

LOCAL_SHARED_LIBRARIES := \
	sdl-1.2

LOCAL_LDLIBS := -lz -llog

# Also need the JNI headers.
LOCAL_C_INCLUDES := \
	$(LOCAL_PATH)/common \
	$(LOCAL_PATH)/emucore \
	$(LOCAL_PATH)/gui \
	$(LOCAL_PATH)/unix \
	$(LOCAL_PATH)/android \
	$(LOCAL_PATH)/libpng \
	$(LOCAL_PATH)/../../common \
	$(LOCAL_PATH)/../../common/sdl-1.2/include \
	$(JNI_H_INCLUDE) \
	$(LOCAL_C_INCLUDES)

# Special compiler flags.
LOCAL_CFLAGS += -O0 -fexceptions -fvisibility=hidden -fpermissive

LOCAL_CFLAGS += \
	-DUNIX \
	-DBSPF_UNIX \
	-DHAVE_GETTIMEOFDAY \
	-DHAVE_INTTYPES \
	-DSOUND_SUPPORT

# Don't prelink this library.  For more efficient code, you may want
# to add this library to the prelink map and set this to true. However,
# it's difficult to do this for applications that are not supplied as
# part of a system image.

LOCAL_PRELINK_MODULE := false

include $(BUILD_SHARED_LIBRARY)
